package finbudgettable.client.ui.grid.cell.permission;

import com.google.gwt.cell.client.ClickableTextCell;
import com.google.gwt.core.client.GWT;
import com.google.gwt.safehtml.client.SafeHtmlTemplates;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;

public class PermissionCell extends ClickableTextCell {

	interface Template extends SafeHtmlTemplates {
        @Template("<span class=\"link\">{0}</span>")
        SafeHtml div(SafeHtml text);
	}
    private static final Template TEMPLATE = GWT.create(Template.class);

    @Override
    protected void render(Context context, SafeHtml value, SafeHtmlBuilder sb) {
        if (value != null) {
        	sb.append(TEMPLATE.div(value));
        }
    }

}
